package com.wtwd.device.service.impl;


import com.wtwd.device.dao.AppUpgradeMapper;
import com.wtwd.device.model.entity.UpgradeFile;
import com.wtwd.device.model.entity.UpgradeVo;
import com.wtwd.device.service.AppUpgradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author mjy
 * @date 2021/08/12
 * @description
 */
@Service
public class AppUpgradeServiceImpl implements AppUpgradeService {

    @Autowired
    private AppUpgradeMapper appUpgradeMapper;



    @Override
    public UpgradeFile getLatestUpgradeByWatchId(String watchId) {
        return appUpgradeMapper.getLatestUpgradeByWatchId(watchId);
    }

    @Override
    public List<UpgradeVo> getDeviceUpgradeListByWatchId(String watchId, String language) {
        return appUpgradeMapper.getDeviceUpgradeListByWatchId(watchId,language);
    }

    @Override
    public UpgradeFile getUpgradeById(Integer id) {
        return appUpgradeMapper.getUpgradeById(id);
    }

    @Override
    public Integer updateUpgradeFile(UpgradeFile upgradeFile) {
        return appUpgradeMapper.updateUpgradeFile(upgradeFile);
    }

    @Override
    public UpgradeFile getUpGradeByWatchIdAndVersion(String watchId, String version) {
        return appUpgradeMapper.getUpGradeByWatchIdAndVersion(watchId,version);
    }
}
